package com.vm.osm.business.service.impl;

import com.vm.osm.business.common.exception.BusinessException;
import com.vm.osm.business.dao.OsmLogicEquAttrMapper;
import com.vm.osm.business.entity.OsmLogicEquAttr;
import com.vm.osm.business.service.IOsmLogicEquAttrService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

@Service
public class OsmLogicEquAttrServiceImpl
        extends AbstractServiceImpl<OsmLogicEquAttr, String> implements IOsmLogicEquAttrService {
    private OsmLogicEquAttrMapper mapper;

    public OsmLogicEquAttrServiceImpl(OsmLogicEquAttrMapper mapper) {
        super(mapper);
        this.mapper = mapper;
    }

    @Override
    public int deleteByEquId(String equ_id) {
        if (StringUtils.isEmpty(equ_id)) throw new BusinessException("设备Id为空");
        return mapper.deleteByEquId(equ_id);
    }
}
